﻿<UserControl x:Class="GermaneShanidze.Applications.Jokeri.Views.LobbyChatView"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d">
    
    <Grid x:Name="LayoutRoot" Background="White">
        <Grid.RowDefinitions>
            <RowDefinition Height="160"/>
            <RowDefinition Height="40" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="290" />
            <ColumnDefinition Width="40" />
        </Grid.ColumnDefinitions>
        
        <ListBox x:Name="ChatMessagesListBox" Grid.Column="0" Grid.ColumnSpan="2" Grid.Row="0" Margin="5,5,5,5" Width="320" Height="150"
                 ItemsSource="{Binding ChatMessages}" >
        </ListBox>
        
        <TextBox x:Name="ChatMessageTextBox" Grid.Column="0" Grid.Row="2" Width="280" Height="30" Margin="5,5,5,5"
                 Text="{Binding CurrentChatMessage, Mode=TwoWay}" />
        
        <Button x:Name="SendMessageButton" Height="30" Width="30" Grid.Column="2" Grid.Row="2" Command="{Binding SendChatMessage}">
            <Button.Template>
                <ControlTemplate>
                    <Image Source="../Resources/Graphics/Messages-Icon.png" />
                </ControlTemplate>
            </Button.Template>
        </Button>

    </Grid>
</UserControl>
